//
//  HZJMusicManagerTVCell.m
//  HZ_Beautiful_Music
//
//  Created by dllo on 16/4/6.
//  Copyright © 2016年 ui. All rights reserved.
//

#import "HZJMusicManagerTVCell.h"

@interface HZJMusicManagerTVCell ()



@property (nonatomic, strong) UILabel *title;
@property (nonatomic, strong) UILabel *name;


@end

@implementation HZJMusicManagerTVCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.title = [[UILabel alloc] init];
        [self.contentView addSubview:_title];
        
        self.name = [[UILabel alloc] init];
        [self.contentView addSubview:_name];
        _name.font = [UIFont systemFontOfSize:14];
        
        self.image = [[UIImageView alloc] init];
        [self.contentView addSubview:_image];
//        _image.backgroundColor = [UIColor redColor];
        
    }
    return self;
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    _title.frame = CGRectMake(15, 10, self.bounds.size.width - 50, 20);
    _name.frame = CGRectMake(15, 35, 20, 18);
    
    [_name sizeToFit];
 
    _image.frame = CGRectMake(self.bounds.size.width - 60, self.bounds.size.height / 2 - 20, 25, 25);
    
}

- (void)setDetailModel:(HZJSongDetailModel *)detailModel {
    
    _detailModel = detailModel;
    _title.text = detailModel.name;
    _name.text = detailModel.singerName;
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
